<?php

class IfComponent extends BlueprintComponent {
	
	
	function parse(&$element, $condition, $keepTag = true) {
		$doc = $element->document;
		$text = "if ($condition) {";
		$element->parentNode->insertBefore($doc->createPHPNode($text), $element);
		$element->parentNode->insertBefore($doc->createPHPNode("}"), $element->nextSibling);
	}
}
?>